﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Clases;
using slnNegocio;

namespace slnMetodosYEstandares
{
    public partial class frmLogin : Form
    {
        public frmLogin()
        {
            InitializeComponent();
        }

        private void lblRegistrarse_Click(object sender, EventArgs e)
        {
            frmRegistrar registro = new frmRegistrar();
            registro.ShowDialog();
        }

        private void btnCancelar_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnEntrar_Click(object sender, EventArgs e)
        {
            if (AccesoLogica.verificarAnalista(Int32.Parse(txtCodigo.Text), txtContraseña.Text))
            {
                frmPrincipal Principal = new frmPrincipal();
                Principal.id_analista = Int32.Parse(txtCodigo.Text);
                Principal.Show();
                Hide();
            }
            else
            {
                MessageBox.Show("Error");
            }
        }

    }
}
